3.1355 \(\int \frac{x (1+x)^2}{\left (1+x^2\right )^3} \, dx\)

Optimal. Leaf size=39 \[ -\frac{(x+1)^2}{4 \left (x^2+1\right )^2}-\frac{1-x}{4 \left (x^2+1\right )}+\frac{1}{4} \tan ^{-1}(x) \]

[Out]

-(1 + x)^2/(4*(1 + x^2)^2) - (1 - x)/(4*(1 + x^2)) + ArcTan[x]/4

_______________________________________________________________________________________

Rubi [A]  time = 0.0501209, antiderivative size = 39, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.214 \[ -\frac{(x+1)^2}{4 \left (x^2+1\right )^2}-\frac{1-x}{4 \left (x^2+1\right )}+\frac{1}{4} \tan ^{-1}(x) \]

Antiderivative was successfully verified.

[In]  Int[(x*(1 + x)^2)/(1 + x^2)^3,x]

[Out]

-(1 + x)^2/(4*(1 + x^2)^2) - (1 - x)/(4*(1 + x^2)) + ArcTan[x]/4

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 5.96322, size = 32, normalized size = 0.82 \[ - \frac{- 4 x + 4}{16 \left (x^{2} + 1\right )} - \frac{\left (x + 1\right ) \left (2 x + 2\right )}{8 \left (x^{2} + 1\right )^{2}} + \frac{\operatorname{atan}{\left (x \right )}}{4} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(x*(1+x)**2/(x**2+1)**3,x)

[Out]

-(-4*x + 4)/(16*(x**2 + 1)) - (x + 1)*(2*x + 2)/(8*(x**2 + 1)**2) + atan(x)/4

_______________________________________________________________________________________

Mathematica [A]  time = 0.022689, size = 28, normalized size = 0.72 \[ \frac{1}{4} \left (\frac{x^3-2 x^2-x-2}{\left (x^2+1\right )^2}+\tan ^{-1}(x)\right ) \]

Antiderivative was successfully verified.

[In]  Integrate[(x*(1 + x)^2)/(1 + x^2)^3,x]

[Out]

((-2 - x - 2*x^2 + x^3)/(1 + x^2)^2 + ArcTan[x])/4

_______________________________________________________________________________________

Maple [A]  time = 0.009, size = 29, normalized size = 0.7 \[{\frac{1}{ \left ({x}^{2}+1 \right ) ^{2}} \left ({\frac{{x}^{3}}{4}}-{\frac{{x}^{2}}{2}}-{\frac{x}{4}}-{\frac{1}{2}} \right ) }+{\frac{\arctan \left ( x \right ) }{4}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int(x*(1+x)^2/(x^2+1)^3,x)

[Out]

(1/4*x^3-1/2*x^2-1/4*x-1/2)/(x^2+1)^2+1/4*arctan(x)

_______________________________________________________________________________________

Maxima [A]  time = 0.772025, size = 43, normalized size = 1.1 \[ \frac{x^{3} - 2 \, x^{2} - x - 2}{4 \,{\left (x^{4} + 2 \, x^{2} + 1\right )}} + \frac{1}{4} \, \arctan \left (x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x + 1)^2*x/(x^2 + 1)^3,x, algorithm="maxima")

[Out]

1/4*(x^3 - 2*x^2 - x - 2)/(x^4 + 2*x^2 + 1) + 1/4*arctan(x)

_______________________________________________________________________________________

Fricas [A]  time = 0.271237, size = 54, normalized size = 1.38 \[ \frac{x^{3} - 2 \, x^{2} +{\left (x^{4} + 2 \, x^{2} + 1\right )} \arctan \left (x\right ) - x - 2}{4 \,{\left (x^{4} + 2 \, x^{2} + 1\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x + 1)^2*x/(x^2 + 1)^3,x, algorithm="fricas")

[Out]

1/4*(x^3 - 2*x^2 + (x^4 + 2*x^2 + 1)*arctan(x) - x - 2)/(x^4 + 2*x^2 + 1)

_______________________________________________________________________________________

Sympy [A]  time = 0.313857, size = 27, normalized size = 0.69 \[ \frac{\operatorname{atan}{\left (x \right )}}{4} + \frac{x^{3} - 2 x^{2} - x - 2}{4 x^{4} + 8 x^{2} + 4} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(x*(1+x)**2/(x**2+1)**3,x)

[Out]

atan(x)/4 + (x**3 - 2*x**2 - x - 2)/(4*x**4 + 8*x**2 + 4)

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.283469, size = 36, normalized size = 0.92 \[ \frac{x^{3} - 2 \, x^{2} - x - 2}{4 \,{\left (x^{2} + 1\right )}^{2}} + \frac{1}{4} \, \arctan \left (x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x + 1)^2*x/(x^2 + 1)^3,x, algorithm="giac")

[Out]

1/4*(x^3 - 2*x^2 - x - 2)/(x^2 + 1)^2 + 1/4*arctan(x)